<?php
/**
 * 云打印平台，agent管理员
 * @author lss
 * 2017-08-14
 */
namespace soa\mp\cloudPrint;

use soa\client;

class agentManagers  extends client
{
    /**
     * 服务地址
     * @var string
     */
    public $service_url = 'http://mp.kuaidihelp.com/';
    /**
     * 服务名称
     * @var string
     */
    protected $service_name = 'kuaidihelp_mp';

	//添加
	public function add($uid,$platform,$agentGuid,$extraInfo = []){
		return $this->post("api/cloudPrint/agentManagers/add",compact('uid','platform','agentGuid','extraInfo'));
	}

	//删除
	public function del($uid,$platform,$agentGuid){
		return $this->post("api/cloudPrint/agentManagers/del",compact('uid','platform','agentGuid'));
	}

	//获取管理员的agent
	public function getAgents($uid,$platform,$limit = [],$orderBy = "id ASC"){
		return $this->post("api/cloudPrint/agentManagers/getAgents",compact('uid','platform','limit','orderBy'));
	}

	//获取agent的管理员
	public function getManagers($agentGuid,$limit = [],$orderBy = "id ASC"){
		return $this->post("api/cloudPrint/agentManagers/getManagers",compact('agentGuid','limit','orderBy'));
	}

	//微商添加管理员
	public function vAdd($text,$uid,$platform,$extraInfo = []){
		return $this->post("api/cloudPrint/agentManagers/add",compact('text','uid','platform','extraInfo'));
	}
}